/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

export function isArray(arr) {
  return (arr instanceof Array);
}

export function isJson(data) {
  return typeof data === "object" && Object.prototype.toString.call(data).toLowerCase() === "[object object]" && !items.isArray(data);
}

export function isEmptyArray(params) {
  if (typeof params == "object" &&
    JSON.stringify(params) == "[]" &&
    params.length == 0
  ) {
    return true;
  } else {
    return false;
  }
}

export function isEmptyObject(params) {
  if (typeof params == "object" &&
    JSON.stringify(params) == "{}"
  ) {
    return true;
  } else {
    return false;
  }
}

export function isFunction(params) {
  if (typeof params == "function" && params != undefined) {
    return true;
  } else {
    return false;
  }
}